Having the macro-searcing process extend to the current working directory would be
really useful, as project-specific macros could be loaded and used. I came up with
this while thinking how nice it would be to have my own custom compile/run routines
for a python file, or a java file, or a perl or whatever. Moreover, commandline parameters
and other paths and files could be easily specified with flexibility without having
to type them repeatedly. This was my solution to the problem, by adding these lines
to Macros.java's loadMacros() method:
String cwd = null;
if(jEdit.getActiveView() != null){
cwd = jEdit.getActiveView().getBuffer().getDirectory();
cwd = cwd.substring(0,cwd.length()-1);
cwdMacroPath = MiscUtilities.constructPath(cwd,".");
loadMacros(macroHierarchy,"",new File(cwdMacroPath));
}
And of course add "private static String cwdMacroPath;"
Submitted | encorejane - 2007-12-12 - 09:57:14z | Assigned | nobody |
---|---|---|---|
Priority | 5 | Category | None |
Status | Open | Group | None |
Resolution | None | Visibility | No |